/*
* Task3Arrays
*
* r1
*
* GNU General Public License v3.0
*/

package com.acme;

public class Task3Arrays {
	private static int n = 100;
	
	private static int[] makeArray(int count) {
		int[] arr = new int[count];
		
		for(int i = 0; i < count; i++)
		{
			arr[i] = i + 1;
		}
		
		return arr;
	}
	
	private static double avg(int[] arr) {
		int sum = 0;
		double average;
		
		for(int num : arr) {
			sum += num;
		}
		average = sum / arr.length;
		
		return average;
	}
	
	public static void main(String[] args) {
		int[] arr;
		
		/*
		for (int i = 1; i <= 50; i++) {
			System.out.println(i);
		}
		*/
		
		/*
		for (int i = 1; i <= 50; i++) {
			if(i % 3 == 0) {
				System.out.println("Number " + i + " is divisible by three");
			}
		}
		*/
		
		arr = makeArray(n);
		System.out.println("Average: " + avg(arr));
	}
}
